<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改支付商支付类型')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payerPayType-edit" th:object="${payerPayType}">
            <input id="payTypeId" name="payTypeId" th:field="*{payTypeId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">支付商id：</label>
				<div class="col-sm-8">
					<select style="width: 100%;height: 36px; border: 1px solid #ddd;" name="payerId">
						<option value=""></option>
						<option th:each="payer:${payers}" th:value="${payer.userId}" th:text="${payer.userName}" th:field="*{payerId}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">支付类型：</label>
				<div class="col-sm-8">
					<input id="payType" name="payType" th:field="*{payType}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">支付类型别名：</label>
				<div class="col-sm-8">
					<input id="payLabel" name="payLabel" th:field="*{payLabel}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">最小金额：</label>
				<div class="col-sm-8">
					<input id="minAmount" type="number" name="minAmount" class="form-control" th:field="*{minAmount}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">最大金额：</label>
				<div class="col-sm-8">
					<input id="maxAmount" type="number" name="maxAmount" class="form-control" th:field="*{maxAmount}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">预充值费率：</label>
				<div class="col-sm-8">
					<input id="depositRate" type="number" name="depositRate" class="form-control" th:field="*{depositRate}">
					<div>注: -1表示不需要预充值</div>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "channel/payerPayType";
		$("#form-payerPayType-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-payerPayType-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
